package com.meng.android.component;

import com.meng.android.util.FormValidation;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public abstract class RowComponent extends LinearLayout implements BindingForm {

	protected String[] bindingElement;
	protected FormValidation mFormValidation;

	public RowComponent(Context context) {
		super(context);
	}

	public RowComponent(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	public RowComponent(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	@Override
	public void setBindingData(String[] strings) {
		this.bindingElement = strings;
	}

	public void setFormValidation(FormValidation mFormValidation) {
		this.mFormValidation = mFormValidation;
	}

	abstract public <T> boolean validate(Class<T> clazz, T object);
}